﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;

namespace Foundations.Net.Pooling
{
    public class Worker
    {
        int _id;
        String _thread = "";

        public Worker(int id)
        {
            _id = id;
        }

        public String ThreadId
        {
            get { return _thread; }
            set { _thread = value; }
        }

        public void DoWork()
        {
            Thread.Sleep(500); 
            Console.WriteLine(System.Threading.Thread.CurrentThread.Name + ":(Object Id: " + _id.ToString() + ") Thread Id: " + ThreadId);

        }
    }
}
